package cn.amarone.controller;

import cn.amarone.model.User;
import cn.amarone.service.LoginService;
import cn.amarone.utill.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping()
public class LoginController {


    @Autowired
    private LoginService loginService;

    @PostMapping("/login/test")
    public ResponseResult login(@RequestBody User user){
        return loginService.login(user);
    }

    @GetMapping("/loginOut")
    public ResponseResult loginOut(){
        return loginService.logout();
    }
}
